import type { AppRouteModule } from '@/router/types';

import { LAYOUT } from '@/router/constant';
import { t } from '@/hooks/web/useI18n';

const done: AppRouteModule = {
  path: '/done',
  name: 'Done',
  component: LAYOUT,
  redirect: '/done/index',
  meta: {
    hideChildrenInMenu: true,
    icon: 'yichuli',
    title: t('routes.dashboard.done'),
    orderNo: 1000002,
  },
  children: [
    {
      path: 'index',
      name: 'donePage',
      component: () => import('@/views/business/done/index.vue'),
      meta: {
        title: t('routes.dashboard.done'),
        icon: 'yichuli',
        hideMenu: true,
      },
    },
    {
      path: 'train-details-done',
      name: 'trainDetailsDone',
      component: () => import('@/views/business/done/train-details-done.vue'),
      meta: {
        title: t('routes.dashboard.details'),
        hideTab: true,
        hideMenu: true,
        currentActiveMenu: '/done/index',
      },
    },
    {
      path: 'test-details-done',
      name: 'testDetailsDone',
      component: () => import('@/views/business/done/test-details-done.vue'),
      meta: {
        title: t('routes.dashboard.details'),
        hideTab: true,
        hideMenu: true,
        currentActiveMenu: '/done/index',
      },
    },
  ],
};

export default done;
